<?php die() ?>


CREATE TABLE `users` (
`id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, 
`login` VARCHAR(255) NOT NULL, 
`password` VARCHAR(32) NOT NULL, 
`email` VARCHAR(255) NOT NULL, 
`nicename` VARCHAR(255) NULL, 
`role` VARCHAR(255) NOT NULL DEFAULT 'user', 
`status` ENUM( '0', '1' , '2' ) NOT NULL DEFAULT '0', 
`meta` TEXT NULL, 
UNIQUE (`login`),
UNIQUE (`email`)
) ENGINE = MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

INSERT INTO `users` (
`id`, 
`login`, 
`password`, 
`email`, 
`nicename`, 
`role`, 
`status`, 
`meta`
) VALUES (
NULL, 
'admin', 
MD5('admin'), 
'rakhimbaev@ya.ru', 
'Bakhadir Rakhimbaev', 
'admin', 
'1', 
NULL
);


CREATE TABLE `nodes` (
`id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, 
`title` VARCHAR(255) NOT NULL, 
`short_text` TEXT NOT NULL, 
`full_text` LONGTEXT NOT NULL, 
`publish_date` DATE NOT NULL, 
`published` ENUM('0','1') NOT NULL DEFAULT '0', 
`front` ENUM('0','1') NOT NULL, 
`uid` INT(10) NOT NULL, 
`type` VARCHAR(255) NOT NULL DEFAULT 'node', 
`category` VARCHAR( 255 ) NOT NULL DEFAULT 'default', 
`url_alias` VARCHAR( 255 ) NULL, 
`language` VARCHAR( 10 ) NOT NULL DEFAULT 'ru',
`meta` TEXT NULL, 
INDEX (`uid`), 
INDEX ( `category` ), 
INDEX ( `url_alias` ),
INDEX ( `language` ),
INDEX ( `type` ),
INDEX ( `published` ),
INDEX ( `front` )
) ENGINE = MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


CREATE TABLE `session` (
`id` char(32),
`modified` int,
`lifetime` int,
`data` text,
PRIMARY KEY (`id`)
) ENGINE = MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


CREATE TABLE `log` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`ip` VARCHAR( 255 ) NOT NULL DEFAULT 'unknown',
`ua` VARCHAR( 255 ) NOT NULL DEFAULT 'unknown',
`referer` VARCHAR( 255 ) NOT NULL DEFAULT 'none',
`url` VARCHAR( 255 ) NOT NULL DEFAULT 'none',
`tstamp` INT( 10 ) NOT NULL DEFAULT '0'
) ENGINE = MYISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


CREATE TABLE `tags` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`tag` VARCHAR( 255 ) NOT NULL,
`nid` INT( 10 ) NOT NULL,
`url_alias` VARCHAR( 255 ) NULL DEFAULT NULL,
`language` VARCHAR( 255 ) NOT NULL DEFAULT 'ru',
 INDEX ( `nid` ),
 INDEX ( `url_alias` ),
 INDEX ( `language` )
) ENGINE = MYISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


CREATE TABLE `bot` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`resource` VARCHAR( 255 ) NOT NULL ,
`uri` TEXT NOT NULL ,
`parsed` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`tstamp` INT( 10 ) NOT NULL
) ENGINE = MYISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
